﻿<%@ Application Language="C#" %>
<script runat="server">

    protected void Application_BeginRequest(Object sender, EventArgs e)
    {

        Application["StartTime"] = System.DateTime.Now;

    }

    protected void Application_EndRequest(Object sender, EventArgs e)
    {

        System.DateTime startTime = (System.DateTime)Application["StartTime"];
        System.DateTime endTime = System.DateTime.Now;
        System.TimeSpan ts = endTime - startTime;
        //Response.Write("页面执行耗时：" + ts + "秒");

    }
    
    void Application_Start(object sender, EventArgs e) 
    {
        // 在应用程序启动时运行的代码        
        //NetCMS.Content.MyTimer.Instance().Start(); 
    }
    
    void Application_End(object sender, EventArgs e) 
    {
        //  在应用程序关闭时运行的代码
       
    }

    void Application_Error(object sender, EventArgs e)
    {
        //Exception x = Server.GetLastError().GetBaseException();        
        //NetCMS.Web.UI.WebHint.ShowError(x.ToString(), "",false);        
        //NetCMS.Web.UI.WebHint.ShowError(x.Message, "", false);
    }

    void Session_Start(object sender, EventArgs e) 
    {
        //Session.Timeout = 60;
        //NetCMS.Global.Current.Set(new NetCMS.Model.GlobalUserInfo("469e80d32c0559f8", "admin", "0"));
    }

    void Session_End(object sender, EventArgs e) 
    {
        //Session.Clear();        
    }
       
</script>
